from sqlalchemy import Column, Integer, String, CHAR, DECIMAL
from sqlalchemy.dialects.mysql import LONGTEXT
from datetime import datetime
from app.models.base import db, Base


class taobao_orders(Base):
    id = Column(Integer, primary_key=True, autoincrement=True)
    order_number = Column(String(30), nullable=False, unique=True)
    total = Column(Integer, nullable=False, default=0)
    remain = Column(Integer, nullable=False, default=0)
    order_detail = Column(String(180), default='')
    amount = Column(DECIMAL(12, 2), default=0)
    shop = Column(String(50), default='')
    Logistics_log = Column(String(50), default='')
    has_exchange = Column(Integer, default=0)
    type = Column(String(20), default='normal')
    buyer = Column(String(50), default='')
    text_check_remain = Column(Integer,default=0)
    ai_check_remain = Column(Integer,default=0)
    text_check_unlimit_remain = Column(Integer,default=0)
    ai_check_unlimit_remain = Column(Integer,default=0)
    # sku_id = Column(String(30), default='')
